Skip to content

feat: port algebra/stepindex.v - #515

Merged
Kaptch merged 36 commits into
leanprover-community:masterfrom
ISTA-PLV:StepIndexing
Jul 27, 2026
Merged

feat: port algebra/stepindex.v#515
Kaptch merged 36 commits into
leanprover-community:masterfrom
ISTA-PLV:StepIndexing

Conversation

@alvinylt

@alvinylt alvinylt commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Description

Port algebra/stepindex.v. It will be nice to have this ready before moving onto algebra/stepindex_finite.v as the latter requires refactoring a large number of files.

Addresses #203.

The current implementation defines SIdx as a type class that extends LT, LE and Zero from Init.Prelude so that we can reuse the notations <, and 0. Meanwhile, succᵢ is a notation defined on our own.

Checklist of definitions and theorems
  • SIdx.case
  • SIdx.eq_dec
  • SIdx.inhabited
  • SIdx.le_0_l
  • SIdx.le_0_r
  • SIdx.le_dec
  • SIdx.le_gt_cases
  • SIdx.le_lt_trans
  • SIdx.le_lteq (ignored)
  • SIdx.le_neq
  • SIdx.le_ngt
  • SIdx.le_po
  • SIdx.le_succ_diag_r
  • SIdx.le_succ_l
  • SIdx.le_succ_l_2 (ignored)
  • SIdx.le_total
  • SIdx.limit
  • SIdx.limit_0
  • SIdx.limit_S
  • SIdx.limit_finite
  • SIdx.limit_lt_0
  • SIdx.lt_dec
  • SIdx.lt_ge_cases
  • SIdx.lt_le_incl
  • SIdx.lt_le_trans
  • SIdx.lt_nge
  • SIdx.lt_strict
  • SIdx.lt_succ_diag_r (ignored)
  • SIdx.lt_succ_diag_r'
  • SIdx.lt_succ_r
  • SIdx.lt_trans (ignored)
  • SIdx.lt_trichotomy (ignored)
  • SIdx.lt_wf (ignored)
  • SIdx.neq_0_lt_0
  • SIdx.neq_succ_0
  • SIdx.nlt_0_r (ignored)
  • SIdx.nlt_succ_r
  • SIdx.rec
  • SIdx.rec_lim
  • SIdx.rec_lim_ext (ignored)
  • SIdx.rec_succ
  • SIdx.rec_unfold
  • SIdx.rec_zero
  • SIdx.succ_inj
  • SIdx.succ_le_mono
  • SIdx.succ_lt_mono
  • SIdx.succ_neq
  • SIdx.weak_case (ignored)
  • SIdxFinite
  • SIdxMixin
  • sidx

Checklist

  • My code follows the mathlib naming and code style conventions
  • I have added my name to the authors section of any appropriate files

@Kaptch

Kaptch commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

May I please ask to add in IrisMath instances of SIdx for ordinal type and some initial ordinal (\omega_1 would work)? Most probably non-\omega instances for SIdx would be defined on top of Mathlib, and it would be nice to have examples.

@alvinylt

Copy link
Copy Markdown
Contributor Author

May I please ask to add in IrisMath instances of SIdx for ordinal type and some initial ordinal (\omega_1 would work)? Most probably non-\omega instances for SIdx would be defined on top of Mathlib, and it would be nice to have examples.

Two instances of SIdx are introduced, one for Ordinal and another for Subtype with Ordinal.

We have also proved that the notion of limits in SIdx is the same as that for Preorder in Mathlib.

@Kaptch

Kaptch commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

Comment thread IrisMath/IrisMath/StepIndex.lean
@Kaptch

Kaptch commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Nice! I think, unless you want to include something more in this PR, it looks ready to merge.
I'm not sure what plan you have with @MackieLoeffel regarding the subsequent parametrization of OFE/logic with step-index, but if possible, could you please split it into OFE part and logic parts?

@alvinylt

Copy link
Copy Markdown
Contributor Author

Given it's likely that Iris/Std/Classes.lean will be removed (#518), I think it will be good to first replace uses of those type classes with built-in ones before merging.

And yes, the plan is to port algebra/stepindex_finite.v after this and parameterise definitions in the algebra folder (following the same PR in Rocq).

but if possible, could you please split it into OFE part and logic parts?

Do you mean separate changes to OFE and CMRA?

@Kaptch

Kaptch commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Yep, I think first porting OFE and fixing step-index to \omega on CMRA level; and then porting CMRA fixing step-index in COFESolver would be a good split.
Porting BI is going to require some design choices on how to treat logical rules that don't work in the transfinite logic, and it involves CMRA definition.

In the OFE part, the piece that will need some design choices is Banach fixpoints, because here it would probably be good to think if it makes sense to have two fixpoints: the old one fixed to \omega for people interested in extraction, and step-index fixpoints for people who want to work with transfinite OFEs.

@alvinylt
alvinylt marked this pull request as ready for review July 22, 2026 15:37
@lzy0505 lzy0505 linked an issue Jul 23, 2026 that may be closed by this pull request
@alvinylt

Copy link
Copy Markdown
Contributor Author

Ready to be merged if everything looks good. Then I'll create a separate PR for parametrising OFE.lean on top of this.

@Kaptch

Kaptch commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Thank you! Will merge ASAP :)

@Kaptch
Kaptch merged commit 820238b into leanprover-community:master Jul 27, 2026
5 checks passed
@Kaptch

Kaptch commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Thanks again! :)
If you start working on adding step-index parameter to OFEs before #533 is merged, please rebase on top of that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port algebra/stepindex.v

2 participants